#!/bin/bash

linuxpath="/data/home/xiaoq/dataset/linux/smalllinux"
gccpath="/data/home/xiaoq/dataset/gcc-gz/smallgcc"
vmapath="/data/home/xiaoq/dataset/vma/vma_tar/smallvma"
vmdkpath="/data/home/xiaoq/dataset/vmdk-1-restore/smallvmdk/small/"

path=$gccpath
./destor $gccpath
./rebuild
echo "2KB" >> speed_test
./destor $path -p"test-pfe-speed yes" -p"chunk-min-size 512" -p"chunk-avg-size 2048" -p"chunk-max-size 16384" -p"sketch-method rabin_only" >> speed_test
./rebuild
./destor $path -p"test-pfe-speed yes" -p"chunk-min-size 512" -p"chunk-avg-size 2048" -p"chunk-max-size 16384" -p"sketch-method rabin_only_8" >> speed_test
./rebuild
./destor $path -p"test-pfe-speed yes" -p"chunk-min-size 512" -p"chunk-avg-size 2048" -p"chunk-max-size 16384" -p"sketch-method rabin_only_16" >> speed_test
./rebuild
echo "4KB" >> speed_test
./destor $path -p"test-pfe-speed yes" -p"chunk-min-size 1024" -p"chunk-avg-size 4096" -p"chunk-max-size 32768" -p"sketch-method rabin_only" >> speed_test
./rebuild
./destor $path -p"test-pfe-speed yes" -p"chunk-min-size 1024" -p"chunk-avg-size 4096" -p"chunk-max-size 32768" -p"sketch-method rabin_only_8" >> speed_test
./rebuild
./destor $path -p"test-pfe-speed yes" -p"chunk-min-size 1024" -p"chunk-avg-size 4096" -p"chunk-max-size 32768" -p"sketch-method rabin_only_16" >> speed_test
./rebuild
echo "8KB" >> speed_test
./destor $path -p"test-pfe-speed yes" -p"chunk-min-size 2048" -p"chunk-avg-size 8192" -p"chunk-max-size 65536" -p"sketch-method rabin_only" >> speed_test
./rebuild
./destor $path -p"test-pfe-speed yes" -p"chunk-min-size 2048" -p"chunk-avg-size 8192" -p"chunk-max-size 65536" -p"sketch-method rabin_only_8" >> speed_test
./rebuild
./destor $path -p"test-pfe-speed yes" -p"chunk-min-size 2048" -p"chunk-avg-size 8192" -p"chunk-max-size 65536" -p"sketch-method rabin_only_16" >> speed_test
./rebuild
echo "16KB" >> speed_test
./destor $path -p"test-pfe-speed yes" -p"chunk-min-size 4096" -p"chunk-avg-size 16384" -p"chunk-max-size 131072" -p"sketch-method rabin_only" >> speed_test
./rebuild
./destor $path -p"test-pfe-speed yes" -p"chunk-min-size 4096" -p"chunk-avg-size 16384" -p"chunk-max-size 131072" -p"sketch-method rabin_only_8" >> speed_test
./rebuild
./destor $path -p"test-pfe-speed yes" -p"chunk-min-size 4096" -p"chunk-avg-size 16384" -p"chunk-max-size 131072" -p"sketch-method rabin_only_16" >> speed_test
./rebuild
echo "32KB" >> speed_test
./destor $path -p"test-pfe-speed yes" -p"chunk-min-size 8192" -p"chunk-avg-size 32768" -p"chunk-max-size 262144" -p"sketch-method rabin_only" >> speed_test
./rebuild
./destor $path -p"test-pfe-speed yes" -p"chunk-min-size 8192" -p"chunk-avg-size 32768" -p"chunk-max-size 262144" -p"sketch-method rabin_only_8" >> speed_test
./rebuild
./destor $path -p"test-pfe-speed yes" -p"chunk-min-size 8192" -p"chunk-avg-size 32768" -p"chunk-max-size 262144" -p"sketch-method rabin_only_16" >> speed_test
./rebuild
echo "64KB" >> speed_test
./destor $path -p"test-pfe-speed yes" -p"chunk-min-size 16384" -p"chunk-avg-size 65536" -p"chunk-max-size 524288" -p"sketch-method rabin_only" >> speed_test
./rebuild
./destor $path -p"test-pfe-speed yes" -p"chunk-min-size 16384" -p"chunk-avg-size 65536" -p"chunk-max-size 524288" -p"sketch-method rabin_only_8" >> speed_test
./rebuild
./destor $path -p"test-pfe-speed yes" -p"chunk-min-size 16384" -p"chunk-avg-size 65536" -p"chunk-max-size 524288" -p"sketch-method rabin_only_16" >> speed_test
./rebuild
